/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.easoft.code.pos.data.pojos;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Eliu
 */
@Entity
@Table(name = "documento_resolucion")
@NamedQueries({
    @NamedQuery(name = "DocumentoResolucion.findAll", query = "SELECT d FROM DocumentoResolucion d"),
    @NamedQuery(name = "DocumentoResolucion.findBySerie", query = "SELECT d FROM DocumentoResolucion d WHERE d.serie = :serie"),
    @NamedQuery(name = "DocumentoResolucion.findByNombre", query = "SELECT d FROM DocumentoResolucion d WHERE d.nombre = :nombre"),
    @NamedQuery(name = "DocumentoResolucion.findByNoInicio", query = "SELECT d FROM DocumentoResolucion d WHERE d.noInicio = :noInicio"),
    @NamedQuery(name = "DocumentoResolucion.findByNoFinal", query = "SELECT d FROM DocumentoResolucion d WHERE d.noFinal = :noFinal")})
public class DocumentoResolucion implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "serie")
    private String serie;
    @Basic(optional = false)
    @Column(name = "nombre")
    private String nombre;
    @Basic(optional = false)
    @Column(name = "no_inicio")
    private int noInicio;
    @Column(name = "no_final")
    private Integer noFinal;

    public DocumentoResolucion() {
    }

    public DocumentoResolucion(String serie) {
        this.serie = serie;
    }

    public DocumentoResolucion(String serie, String nombre, int noInicio) {
        this.serie = serie;
        this.nombre = nombre;
        this.noInicio = noInicio;
    }

    public String getSerie() {
        return serie;
    }

    public void setSerie(String serie) {
        this.serie = serie;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public int getNoInicio() {
        return noInicio;
    }

    public void setNoInicio(int noInicio) {
        this.noInicio = noInicio;
    }

    public Integer getNoFinal() {
        return noFinal;
    }

    public void setNoFinal(Integer noFinal) {
        this.noFinal = noFinal;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (serie != null ? serie.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DocumentoResolucion)) {
            return false;
        }
        DocumentoResolucion other = (DocumentoResolucion) object;
        if ((this.serie == null && other.serie != null) || (this.serie != null && !this.serie.equals(other.serie))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.easoft.code.pos.data.pojos.DocumentoResolucion[ serie=" + serie + " ]";
    }

}
